package routes

import (
	"github.com/goravel/framework/facades"
	"github.com/hulutech-web/goravel-socket/servers"
	"goravel/app/services/deepseek"
	"goravel/packages/goravel-crud-advance/controller"
)

func Web() {

	facades.Route().Static("/resource", "./public/resources")

	facades.Route().Static("/uploads", "./public/uploads")

	//操作面板面板静态资源路由
	facades.Route().Static("/dist", "./public/dist")

	// swagger
	swaggerController := controller.NewSwaggerController()
	facades.Route().Get("/swagger/*any", swaggerController.Index)

	websocketHandler := &servers.Controller{}
	facades.Route().Get("/ws", websocketHandler.Run)
	go servers.Manager.Start()
	//启动deepseek sse服务
	go deepseek.SetUpSSE()
}
